import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Jiang Jinxi
 * Date: 2024-03-16
 * Time: 14:31
 */
public class Test2 {
    public static void main(String[] args) {
        System.out.println("输入两个点的坐标:");
        Scanner scanner = new Scanner(System.in);
        System.out.print("x1:");
        double x1 = Math.toRadians(scanner.nextDouble());
        System.out.print("y1:");
        double y1 = Math.toRadians(scanner.nextDouble());
        System.out.print("x2:");
        double x2 = Math.toRadians(scanner.nextDouble());
        System.out.print("y2:");
        double y2 = Math.toRadians(scanner.nextDouble());
        double d = 6371.01*Math.acos(Math.sin(x1)*Math.sin(x2)*Math.cos(x1)*Math.cos(x2)*Math.cos(y1-y2));
        System.out.println("最大圆距离:"+d);

    }
}
